#pragma once

/**
This is the actual implementation of gui system. In this case we use CEGUI so all this class does
is init CEGUI and forward events to it
**/
class GuiSystem: public Gui, public Ogre::Singleton<GuiSystem>{
public:
			GuiSystem();
			~GuiSystem();
	/*
	==============================
	INTERFACE IMPL.
	==============================
	*/
	void	init(Ogre::RenderWindow *window, Ogre::SceneManager *scene);
	void	shutdown();
	void	update();
	void	onMouseMove(int relx, int rely);
	void	onMouseDown(int x, int y, int button);
	void	onMouseUp(int x, int y, int button);
	void	onKeyDown(int keycode, int text);
	void	onKeyUp(int keycode, int text);
	//=============================
	inline static GuiSystem &getSingleton(){return *ms_Singleton;}
	inline static GuiSystem *getSingletonPtr(){return ms_Singleton;}
protected:
protected:
	//variables that need to be deleted
	CEGUI::System				*mGuiSystem;
	CEGUI::OgreCEGUIRenderer	*mRenderer;
	GuiConsole					*mConsole;
	//everything below does not need to be freed
	bool	mRunning;
};
